<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'addwork.jsp' starting page</title>
    <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
	<script src="js/date.js"></script>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" type="text/css" href="css/addwork.css"/>
	<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script><!-- 
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script> -->


<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  
  </head>
  
  <body>
   <form action="addwork.do" method="post"> 
    <div id="dd">
   <table>
   <tr>
   <td>
   <input type="hidden" name="id" value="${map.id}">
    <input type="hidden" id="eventId" name="eventId" value="${map.eventId}">
	<input type="hidden" name="term" value="${param.term}">
   <span>*</span>事件名称
   <select name="eventState" id="group_id">
   <c:forEach items="${list}" var="list">
   <option value ="${list.eventAddress}" area="${list.eventId}">${list.eventName}</option>
   </c:forEach>
   </select></td>
   <td><span>*</span>事件地点<input id="eventAddress" type="text" name="eventAddress" value="${map.event_address}">
    <Script>
  var group_id=document.getElementById('group_id');
  group_id.onchange=function(){
 document.getElementById('eventAddress').value=this.value;
 document.getElementById('eventId').value=this.options[this.selectedIndex].getAttribute('area');
  }
  group_id.onchange.call(group_id);
  </script>
   </td>
   <td><span>*</span>工单号<input type="text" name="workId" value="${map.work_id}"></td>
    
   </tr>
   <tr>
   <td><span>*</span>上门时间<input type="datetime" name="againTime" onclick="SetDate(this,'yyyy-MM-dd hh:mm:ss')" value="${map.again_time }"/></td>
   <td><span>*</span>离开时间<input type="datetime" name="endTime" onclick="SetDate(this,'yyyy-MM-dd hh:mm:ss')" value="${map.end_time }"/></td>
<td><span>*</span>工单状态
   
   <select name="workState" >
  <option value ="0">处理中</option>
  <option value ="1">已处理</option>
</select></td>
</tr>
  </table>
	
   </div>
   <c:if test="${param.term!=1}"> <input id="btn2" class="btn btn-primary" type="submit" value="保存"></c:if>
   </form>
  </body>
</html>
